<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: include/logFile.hpp 源文件</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">logFile.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d7/dae/log_file_8hpp.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &lt;fstream&gt;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include &lt;thread&gt;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#include &lt;mutex&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span> </div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#include &quot;<a class="code" href="../../d3/df7/ary__str_8hpp.html">ary_str.hpp</a>&quot;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="preprocessor">#include &quot;<a class="code" href="../../d0/d0e/misc_8hpp.html">misc.hpp</a>&quot;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../df/d8d/namespacewheels.html">wheels</a></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span>{</div>
<div class="foldopen" id="foldopen00020" data-start="{" data-end="};">
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="../../db/dba/classwheels_1_1log_file.html">   20</a></span><span class="keyword">class </span><a class="code hl_class" href="../../db/dba/classwheels_1_1log_file.html">logFile</a> : <span class="keyword">public</span> std::streambuf</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span>{</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="keyword">public</span>:</div>
<div class="foldopen" id="foldopen00023" data-start="{" data-end="};">
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="../../db/dba/classwheels_1_1log_file.html#abbe0d7636998034adaeac004821ed379">   23</a></span>    <span class="keyword">enum</span> <a class="code hl_enumeration" href="../../db/dba/classwheels_1_1log_file.html#abbe0d7636998034adaeac004821ed379">emErrCode</a>{</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="../../db/dba/classwheels_1_1log_file.html#abbe0d7636998034adaeac004821ed379a406523092bf244e8ad47698faf415202">   24</a></span>        <a class="code hl_enumvalue" href="../../db/dba/classwheels_1_1log_file.html#abbe0d7636998034adaeac004821ed379a406523092bf244e8ad47698faf415202">ERR_INIT_DIR</a> = -1000,</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="../../db/dba/classwheels_1_1log_file.html#abbe0d7636998034adaeac004821ed379afb5cf739ff402a8d92c3b0c0602ee91d">   25</a></span>        <a class="code hl_enumvalue" href="../../db/dba/classwheels_1_1log_file.html#abbe0d7636998034adaeac004821ed379afb5cf739ff402a8d92c3b0c0602ee91d">ERR_INIT_FILE</a>,</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span>        <a class="code hl_enumvalue" href="../../db/dba/classwheels_1_1log_file.html#abbe0d7636998034adaeac004821ed379ad15046a5c7c08cd5372722a500fbb166">OK</a> = 0</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="../../db/dba/classwheels_1_1log_file.html#abbe0d7636998034adaeac004821ed379ad15046a5c7c08cd5372722a500fbb166">   27</a></span>    };</div>
</div>
<div class="foldopen" id="foldopen00028" data-start="{" data-end="};">
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html">   28</a></span>    <span class="keyword">struct </span><a class="code hl_struct" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html">stFile</a>{</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#af73bc267445e3ec9de40a884d5fa6780">   29</a></span>        <span class="keywordtype">bool</span>         <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#af73bc267445e3ec9de40a884d5fa6780">m_is_current</a>;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0ba5752daa4014ead5e397889eb51f6">   30</a></span>        std::shared_ptr&lt; std::ofstream &gt;  <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0ba5752daa4014ead5e397889eb51f6">pt_ofs</a>; </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#a432c6c8c218cc1f76e1f0fedc40837c4">   31</a></span>        <span class="keywordtype">size_t</span>       <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#a432c6c8c218cc1f76e1f0fedc40837c4">m_curr_line</a>;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0f098f4a674dee6e0d010c88a334eb0">   32</a></span>        std::string  <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0f098f4a674dee6e0d010c88a334eb0">m_file_name</a>;</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span> </div>
<div class="foldopen" id="foldopen00034" data-start="{" data-end="}">
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#aae807253b474b6ffe5347640eb439253">   34</a></span>        <a class="code hl_function" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#aae807253b474b6ffe5347640eb439253">stFile</a>( <span class="keyword">const</span> std::string&amp; file ):</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>            <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#af73bc267445e3ec9de40a884d5fa6780">m_is_current</a>( false ),</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>            <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0ba5752daa4014ead5e397889eb51f6">pt_ofs</a>( nullptr ),</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span>            <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#a432c6c8c218cc1f76e1f0fedc40837c4">m_curr_line</a>( 0 ),</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span>            <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0f098f4a674dee6e0d010c88a334eb0">m_file_name</a>( file ){}</div>
</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="foldopen" id="foldopen00040" data-start="{" data-end="}">
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#abb47fe1680f4fe6c47516c9c18bda39a">   40</a></span>        <a class="code hl_function" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#abb47fe1680f4fe6c47516c9c18bda39a">stFile</a>( <span class="keyword">const</span> <a class="code hl_struct" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html">stFile</a>&amp; file ):</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span>            <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#af73bc267445e3ec9de40a884d5fa6780">m_is_current</a>( file.<a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#af73bc267445e3ec9de40a884d5fa6780">m_is_current</a> ),</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>            <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0ba5752daa4014ead5e397889eb51f6">pt_ofs</a>( <a class="code hl_namespace" href="../../d8/dcc/namespacestd.html">std</a>::move( file.<a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0ba5752daa4014ead5e397889eb51f6">pt_ofs</a> ) ),</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>            <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#a432c6c8c218cc1f76e1f0fedc40837c4">m_curr_line</a>( file.<a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#a432c6c8c218cc1f76e1f0fedc40837c4">m_curr_line</a> ),</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>            <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0f098f4a674dee6e0d010c88a334eb0">m_file_name</a>( file.<a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0f098f4a674dee6e0d010c88a334eb0">m_file_name</a> ){}</div>
</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span> </div>
<div class="foldopen" id="foldopen00046" data-start="{" data-end="}">
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#a08bb6dfece9728842452db6b6ed56203">   46</a></span>        <a class="code hl_struct" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html">stFile</a>&amp; <a class="code hl_function" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#a08bb6dfece9728842452db6b6ed56203">operator=</a>( <span class="keyword">const</span> <a class="code hl_struct" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html">stFile</a>&amp; file ){</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>            <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0f098f4a674dee6e0d010c88a334eb0">m_file_name</a> = file.<a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0f098f4a674dee6e0d010c88a334eb0">m_file_name</a>;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>            <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#a432c6c8c218cc1f76e1f0fedc40837c4">m_curr_line</a> = file.<a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#a432c6c8c218cc1f76e1f0fedc40837c4">m_curr_line</a>;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>            <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0ba5752daa4014ead5e397889eb51f6">pt_ofs</a> = std::move( file.<a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0ba5752daa4014ead5e397889eb51f6">pt_ofs</a> );</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>            <a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#af73bc267445e3ec9de40a884d5fa6780">m_is_current</a> = file.<a class="code hl_variable" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#af73bc267445e3ec9de40a884d5fa6780">m_is_current</a>;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>            <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>        }</div>
</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>    };</div>
</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="../../db/dba/classwheels_1_1log_file.html#ad44e9a2063a2554b11e333692f59570d">   55</a></span>    <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span>      <a class="code hl_variable" href="../../db/dba/classwheels_1_1log_file.html#ad44e9a2063a2554b11e333692f59570d">MAX_LINE_LEN</a>;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>    std::mutex               __m_mutex;</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span>    <span class="keywordtype">size_t</span>                   __m_max_line;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span>    <span class="keywordtype">size_t</span>                   __m_max_files;</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>    std::ofstream          * __p_current_file;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>    std::string              __m_file_name;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>    std::string              __m_data_buf;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>    <span class="comment">// 记录标准流的旧缓冲区。如果需要重定向标准流，这个就非常重要。</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span>    <span class="comment">// 以用来在结束重定向后恢复。</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>    std::streambuf         * __p_stdout;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span>    std::streambuf         * __p_stderr;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>    <span class="comment">// LOG文件保存的目录，如果没有配置是当前目录下的log目录</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>    std::string              __m_log_root; </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>                                            </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span>    std::vector&lt; stFile &gt;    __m_file;</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>    <span class="keywordtype">int</span> overflow( <span class="keywordtype">int</span> c ) <span class="keyword">final</span>;</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    <span class="keywordtype">bool</span> __new_file();</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>    std::string __make_file_name();</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span>    <span class="keywordtype">bool</span> __create_new_log( <span class="keyword">const</span> std::string&amp; file );</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>    std::string __find_old_file( <span class="keyword">const</span> std::string&amp; path );</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>    <span class="keywordtype">bool</span> __init_dir( <span class="keyword">const</span> std::string&amp; path );</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>    <span class="keywordtype">void</span> __clear();</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>    <span class="keywordtype">void</span> __sort_file();</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>    <a class="code hl_function" href="../../db/dba/classwheels_1_1log_file.html#adeba71a87579ff6412c3dc8622f71841">logFile</a>( <span class="keyword">const</span> std::string&amp; logroot , <span class="keywordtype">bool</span> stdo = <span class="keyword">true</span> , <span class="keywordtype">bool</span> stde = <span class="keyword">true</span> );</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>    <a class="code hl_function" href="../../db/dba/classwheels_1_1log_file.html#ab989537e4794a5e2de465207d7228566">~logFile</a>();</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="../../db/dba/classwheels_1_1log_file.html#af0ca6507647b42f11202d3e08f2cfbad">configure</a>( <span class="keywordtype">size_t</span> maxF , <span class="keywordtype">size_t</span> maxLine , <span class="keyword">const</span> std::string&amp; logroot );</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="../../db/dba/classwheels_1_1log_file.html#ada41c02611e4626902f6d2cae1241ead">add</a>( <span class="keyword">const</span> std::string&amp; data );</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>};</div>
</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span>}</div>
<div class="ttc" id="aary__str_8hpp_html"><div class="ttname"><a href="../../d3/df7/ary__str_8hpp.html">ary_str.hpp</a></div></div>
<div class="ttc" id="aclasswheels_1_1log_file_html"><div class="ttname"><a href="../../db/dba/classwheels_1_1log_file.html">wheels::logFile</a></div><div class="ttdef"><b>定义</b> <a href="#l00020">logFile.hpp:21</a></div></div>
<div class="ttc" id="aclasswheels_1_1log_file_html_ab989537e4794a5e2de465207d7228566"><div class="ttname"><a href="../../db/dba/classwheels_1_1log_file.html#ab989537e4794a5e2de465207d7228566">wheels::logFile::~logFile</a></div><div class="ttdeci">~logFile()</div><div class="ttdef"><b>定义</b> <a href="../../d2/d97/log_file_8cpp_source.html#l00230">logFile.cpp:230</a></div></div>
<div class="ttc" id="aclasswheels_1_1log_file_html_abbe0d7636998034adaeac004821ed379"><div class="ttname"><a href="../../db/dba/classwheels_1_1log_file.html#abbe0d7636998034adaeac004821ed379">wheels::logFile::emErrCode</a></div><div class="ttdeci">emErrCode</div><div class="ttdef"><b>定义</b> <a href="#l00023">logFile.hpp:23</a></div></div>
<div class="ttc" id="aclasswheels_1_1log_file_html_abbe0d7636998034adaeac004821ed379a406523092bf244e8ad47698faf415202"><div class="ttname"><a href="../../db/dba/classwheels_1_1log_file.html#abbe0d7636998034adaeac004821ed379a406523092bf244e8ad47698faf415202">wheels::logFile::ERR_INIT_DIR</a></div><div class="ttdeci">@ ERR_INIT_DIR</div><div class="ttdef"><b>定义</b> <a href="#l00024">logFile.hpp:24</a></div></div>
<div class="ttc" id="aclasswheels_1_1log_file_html_abbe0d7636998034adaeac004821ed379ad15046a5c7c08cd5372722a500fbb166"><div class="ttname"><a href="../../db/dba/classwheels_1_1log_file.html#abbe0d7636998034adaeac004821ed379ad15046a5c7c08cd5372722a500fbb166">wheels::logFile::OK</a></div><div class="ttdeci">@ OK</div><div class="ttdef"><b>定义</b> <a href="#l00027">logFile.hpp:26</a></div></div>
<div class="ttc" id="aclasswheels_1_1log_file_html_abbe0d7636998034adaeac004821ed379afb5cf739ff402a8d92c3b0c0602ee91d"><div class="ttname"><a href="../../db/dba/classwheels_1_1log_file.html#abbe0d7636998034adaeac004821ed379afb5cf739ff402a8d92c3b0c0602ee91d">wheels::logFile::ERR_INIT_FILE</a></div><div class="ttdeci">@ ERR_INIT_FILE</div><div class="ttdef"><b>定义</b> <a href="#l00025">logFile.hpp:25</a></div></div>
<div class="ttc" id="aclasswheels_1_1log_file_html_ad44e9a2063a2554b11e333692f59570d"><div class="ttname"><a href="../../db/dba/classwheels_1_1log_file.html#ad44e9a2063a2554b11e333692f59570d">wheels::logFile::MAX_LINE_LEN</a></div><div class="ttdeci">static const size_t MAX_LINE_LEN</div><div class="ttdef"><b>定义</b> <a href="#l00055">logFile.hpp:55</a></div></div>
<div class="ttc" id="aclasswheels_1_1log_file_html_ada41c02611e4626902f6d2cae1241ead"><div class="ttname"><a href="../../db/dba/classwheels_1_1log_file.html#ada41c02611e4626902f6d2cae1241ead">wheels::logFile::add</a></div><div class="ttdeci">void add(const std::string &amp;data)</div><div class="ttdoc">增加数据内容。将数据内容写入当前的LOG文件</div><div class="ttdef"><b>定义</b> <a href="../../d2/d97/log_file_8cpp_source.html#l00235">logFile.cpp:235</a></div></div>
<div class="ttc" id="aclasswheels_1_1log_file_html_adeba71a87579ff6412c3dc8622f71841"><div class="ttname"><a href="../../db/dba/classwheels_1_1log_file.html#adeba71a87579ff6412c3dc8622f71841">wheels::logFile::logFile</a></div><div class="ttdeci">logFile(const std::string &amp;logroot, bool stdo=true, bool stde=true)</div><div class="ttdoc">ctor</div><div class="ttdef"><b>定义</b> <a href="../../d2/d97/log_file_8cpp_source.html#l00201">logFile.cpp:201</a></div></div>
<div class="ttc" id="aclasswheels_1_1log_file_html_af0ca6507647b42f11202d3e08f2cfbad"><div class="ttname"><a href="../../db/dba/classwheels_1_1log_file.html#af0ca6507647b42f11202d3e08f2cfbad">wheels::logFile::configure</a></div><div class="ttdeci">void configure(size_t maxF, size_t maxLine, const std::string &amp;logroot)</div><div class="ttdoc">配置LOG生成控制参数</div><div class="ttdef"><b>定义</b> <a href="../../d2/d97/log_file_8cpp_source.html#l00011">logFile.cpp:11</a></div></div>
<div class="ttc" id="amisc_8hpp_html"><div class="ttname"><a href="../../d0/d0e/misc_8hpp.html">misc.hpp</a></div></div>
<div class="ttc" id="anamespacestd_html"><div class="ttname"><a href="../../d8/dcc/namespacestd.html">std</a></div><div class="ttdef"><b>定义</b> <a href="../../d1/d92/mandarava_2event_8hpp_source.html#l00038">event.hpp:39</a></div></div>
<div class="ttc" id="anamespacewheels_html"><div class="ttname"><a href="../../df/d8d/namespacewheels.html">wheels</a></div><div class="ttdoc">堆栈信息读取和保存记录</div><div class="ttdef"><b>定义</b> <a href="../../d3/df7/ary__str_8hpp_source.html#l00006">ary_str.hpp:7</a></div></div>
<div class="ttc" id="astructwheels_1_1log_file_1_1st_file_html"><div class="ttname"><a href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html">wheels::logFile::stFile</a></div><div class="ttdef"><b>定义</b> <a href="#l00028">logFile.hpp:28</a></div></div>
<div class="ttc" id="astructwheels_1_1log_file_1_1st_file_html_a08bb6dfece9728842452db6b6ed56203"><div class="ttname"><a href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#a08bb6dfece9728842452db6b6ed56203">wheels::logFile::stFile::operator=</a></div><div class="ttdeci">stFile &amp; operator=(const stFile &amp;file)</div><div class="ttdef"><b>定义</b> <a href="#l00046">logFile.hpp:46</a></div></div>
<div class="ttc" id="astructwheels_1_1log_file_1_1st_file_html_a432c6c8c218cc1f76e1f0fedc40837c4"><div class="ttname"><a href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#a432c6c8c218cc1f76e1f0fedc40837c4">wheels::logFile::stFile::m_curr_line</a></div><div class="ttdeci">size_t m_curr_line</div><div class="ttdef"><b>定义</b> <a href="#l00031">logFile.hpp:31</a></div></div>
<div class="ttc" id="astructwheels_1_1log_file_1_1st_file_html_aae807253b474b6ffe5347640eb439253"><div class="ttname"><a href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#aae807253b474b6ffe5347640eb439253">wheels::logFile::stFile::stFile</a></div><div class="ttdeci">stFile(const std::string &amp;file)</div><div class="ttdef"><b>定义</b> <a href="#l00034">logFile.hpp:34</a></div></div>
<div class="ttc" id="astructwheels_1_1log_file_1_1st_file_html_ab0ba5752daa4014ead5e397889eb51f6"><div class="ttname"><a href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0ba5752daa4014ead5e397889eb51f6">wheels::logFile::stFile::pt_ofs</a></div><div class="ttdeci">std::shared_ptr&lt; std::ofstream &gt; pt_ofs</div><div class="ttdef"><b>定义</b> <a href="#l00030">logFile.hpp:30</a></div></div>
<div class="ttc" id="astructwheels_1_1log_file_1_1st_file_html_ab0f098f4a674dee6e0d010c88a334eb0"><div class="ttname"><a href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#ab0f098f4a674dee6e0d010c88a334eb0">wheels::logFile::stFile::m_file_name</a></div><div class="ttdeci">std::string m_file_name</div><div class="ttdef"><b>定义</b> <a href="#l00032">logFile.hpp:32</a></div></div>
<div class="ttc" id="astructwheels_1_1log_file_1_1st_file_html_abb47fe1680f4fe6c47516c9c18bda39a"><div class="ttname"><a href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#abb47fe1680f4fe6c47516c9c18bda39a">wheels::logFile::stFile::stFile</a></div><div class="ttdeci">stFile(const stFile &amp;file)</div><div class="ttdef"><b>定义</b> <a href="#l00040">logFile.hpp:40</a></div></div>
<div class="ttc" id="astructwheels_1_1log_file_1_1st_file_html_af73bc267445e3ec9de40a884d5fa6780"><div class="ttname"><a href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html#af73bc267445e3ec9de40a884d5fa6780">wheels::logFile::stFile::m_is_current</a></div><div class="ttdeci">bool m_is_current</div><div class="ttdef"><b>定义</b> <a href="#l00029">logFile.hpp:29</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
